Developer Documentation

QuickTime 4 API Documentation

QuickTime 4 Reference

| Previous | Chapter Contents | Chapter Top | Next |

Internal Routines

These functions are used for internal communication between the base and format-specific graphics exporter. Applications will not usually need to call them.


GraphicsExportCanTranscode

Asks whether the current export operation should be performed by transcoding.

pascal ComponentResult GraphicsExportCanTranscode (
                     GraphicsExportComponent ci,
                                         Boolean *canTranscode);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
canTranscode
Points to a Boolean to receive the answer.

DISCUSSION

Graphics exporters may be able to transcode from some inputs and not from others. For instance, the JPEG graphics exporter is able to transcode compressed JPEG streams, but not other kinds of compressed data. Use this call to ask a graphics exporter whether it can transcode the current input with the current settings.

The base graphics exporter makes this call of the format-specific graphics exporter to ask whether the current export operation should be done by transcoding. If the format-specific exporter replies that it should, the base exporter will call GraphicsExportDoTranscode to do so.

If the format-specific exporter implements the GetDontRecompress call and that call returns false , the base exporter will not attempt transcoding.

Format-specific exporters may delegate this call; the base graphics exporter's implementation gives a reply of false .

Format-specific exporters implementing GraphicsExportCanTranscode should call GraphicsExportMayExporterReadInputData . If the answer is no, then the format-specific exporter will not be able to transcode.


GraphicsExportDoTranscode

Performs an export operation by transcoding.

pascal ComponentResult GraphicsExportDoTranscode (
                     GraphicsExportComponent ci);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.

DISCUSSION

The base graphics exporter makes this call of the format-specific graphics exporter to perform a transcoding export. This function should call GraphicsExportGetInputDataSize and GraphicsExportReadInputData to measure and read the input image data, and GraphicsExportWriteOutputData to write the output image file.


GraphicsExportCanUseCompressor

Asks whether to use a compressor.

pascal ComponentResult GraphicsExportCanUseCompressor (GraphicsExportComponent ci,
                                         Boolean *canUseCompressor,
                                         void *qtAtomContainerPtr);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
canUseCompressor
 
A Boolean variable to receive the answer.
qtAtomContainerPtr
 
A pointer to a QTAtomContainer variable. If the answer is true , the format-specific exporter should create a new QuickTime atom container with information about the compression operation and return it here.

DISCUSSION

The base graphics exporter makes this call of the format-specific graphics exporter to ask whether the current export operation should be done by using an image compressor. If the answer is true , the format-specific exporter must also create and return an atom container.

This atom container must contain an atom of type kQTSettingsVideo ( `vide' ). This atom must contain a child atom of type scSpatialSettingsType containing a SCSpatialSettings record specifying which compressor to use, the depth, and the spatial quality.

The `vide' atom may also contain several optional child atoms:

Format-specific exporters may delegate this call; the base graphics exporter's implementation gives a reply of false .

Data in these atoms must be stored big-endian.


GraphicsExportDoUseCompressor

Performs a compressing export.

pascal ComponentResult GraphicsExportDoUseCompressor (GraphicsExportComponent ci,
                     void *qtAtomContainer,
                                         ImageDescriptionHandle *outDesc);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.
qtAtomContainer
An atom container returned by GraphicsExportCanUseCompressor .
outDesc
Points to an image description handle to receive an image description describing the compressed image.

DISCUSSION

The base graphics exporter makes this call to perform a compressing export.

Format-specific exporters will normally delegate this call, unless they implement export to a container format like PICT or QuickTime Image. In that case, they will wrap the base exporter's implementation in one that forms the container about the compressed data.


GraphicsExportDoStandaloneExport

Performs an export operation.

pascal ComponentResult GraphicsExportDoStandaloneExport ( GraphicsExportComponent ci);
ci
Specifies the component instance that identifies your connection to the graphics exporter component.

DISCUSSION

If both CanTranscode and CanUseCompressor reply false , the base graphics exporter makes this call of the format-specific exporter to perform the call.

The format-specific exporter may call GraphicsExportGetInputImageDescription , GraphicsExportGetInputImageDimensions , and GraphicsExportGetInputImageDepth to find out about the input image. It should allocate a pixmap and call GraphicsExportDrawInputImage to draw portions of the input image into that pixmap.

It should call GraphicsExportWriteOutputData to write the image data.


© 1999 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |